<template>
  <div>
    <div class="banner_box" v-if="list.tp_type === 1">
      <div class="pic" @click="itemClick">
        <img :src="list.pic" alt="" />
      </div>
      <div class="title">
        <div class="title-lf">{{ list.title2 }}</div>
        <div class="title-rh">{{ list.title }}</div>
      </div>
    </div>
    <div class="show-banner-title" v-else>
      <div class="banner-title">
        <div class="banner-title-icon">
          <img src="../../../assets/img/home/ic_game.png" alt="">
          <div class="banner-title-rh">{{ list.title }}</div>
        </div>
        <div></div>
      </div>
      <div class="show-pic" @click="itemClick">
        <img :src="list.pic" alt="" />
        <div class="pic_labels">{{list.labels}}</div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    props: {
      list: {
        type: Object,
        default() {
          return {}
        }
      },
    },
    data() {
      return {
      }
    },
    methods: {
      itemClick() {
        
      }
    },
  }
</script>

<style lang="less" scoped>
.banner_box {
  margin-top: .266667rem;
  width: 9.466667rem;
  padding: 0 .266667rem;
  .pic {
    width: 9.466667rem;
    height: 4.106667rem;
    overflow: hidden;
    border-radius: .266667rem;
    img {
      width: 100%;
      height: 100%;
    }
  }
}

.title {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding-top: .266667rem;
  .title-lf {
    padding: .066667rem;
    border: .013333rem solid #222;
    color: #000;
    font-size: .32rem;
    border-radius: .066667rem;
  }
  .title-rh {
    margin-left: .133333rem;
    color: #666666;
    font-size: .32rem;
    width: 7.6rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }
}

.show-banner-title {
  margin-top: .266667rem;
  width: 9.466667rem;
  padding: 0 .266667rem;
}

.banner-title {
  display: flex;
  justify-content: space-between;
  .banner-title-icon {
    display: flex;
    align-items: center;
    font-size: 0.48rem;
    font-weight: 800;
    color: #000;
    img {
      margin-right: 0.133333rem;
      display: inline-block;
      width: 0.586667rem;
      height: 0.586667rem;
    }
  }
}

.show-pic {
  position: relative;
  margin-top: .213333rem;
  width: 9.466667rem;
  height: 4.106667rem;
  border-radius: .266667rem;
  overflow: hidden;
  .pic_labels {
    width: 100%;
    height: .906667rem;
    line-height: .906667rem;
    font-size: .346667rem;
    color: #fff;
    padding-left: .266667rem;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%);
    position: absolute;
    bottom: 0;
    left: 0;
  }
}

.show-pic img {
  width: 100%;
  height: 100%;
}



</style>